home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 90 / CD Actual 90.iso / Software3D / K-3D / k3d-0.4.2.1 / tutorials / data_entry next >
Encoding:
Text File  |  2004-07-23  |  4.7 KB  |  33 lines

  1. //javascript
  2.  
  3. Application.CommandNode("/application/ui").Command("tutorialmessage", "Howdy!  This tutorial will cover some data-entry features in K-3D ...");
  4. Application.CommandNode("/application/window/new_document").Command("activate", "");
  5. Application.CommandNode("/application/document/window/dag").Command("show_properties", "Axes");
  6. Application.CommandNode("/application/ui").Command("tutorialmessage", "One of the standard controls you'll see often throughout K-3D is a \"spin button\" control designed for easy entry of numeric quantities ...");
  7. Application.CommandNode("/application/document/Axes/properties/auto_controls/gridsize").Command("highlight", "");
  8. Application.CommandNode("/application/ui").Command("tutorialmessage", "... As you can see, a spin button displays a numeric value in an editable field along with a pair of arrow buttons.");
  9. Application.CommandNode("/application/ui").Command("tutorialmessage", "As you might have guessed, you can click on the arrow buttons to increase/decrease the value displayed in the spin button in small, discrete \"steps\", or, you can hold down the arrow buttons to \"scroll\" the value up-or-down (not demonstrated).");
  10. Application.CommandNode("/application/ui").Command("tutorialmessage", "Entering a value in the spin button with the keyboard should also be intuitive ...");
  11. Application.CommandNode("/application/document/Axes/properties/auto_controls/gridsize").Command("value", "1");
  12. Application.CommandNode("/application/ui").Command("tutorialmessage", "Note how the spin button contents are automatically selected as soon as you click within it, so you can immediately start typing a new value that will replace the old.");
  13. Application.CommandNode("/application/ui").Command("tutorialmessage", "Also note that you must hit either the \"tab\" or \"enter\" key after typing-in a new value, to signal that you are done.  ");
  14. Application.CommandNode("/application/ui").Command("tutorialmessage", "There's more, however - spin buttons in K-3D display and convert real-world units-of-measure ... note how the \"Grid Size\" spin button we're working with displays \"m\" next to its value - \"m\" is the symbol for \"meters\".  In this case, the Grid Size is 1 meter.");
  15. Application.CommandNode("/application/ui").Command("tutorialmessage", "When you enter a number in a spin button without specifying any unit-of-measure, it will be interpreted using the default unit-of-measure for that type of quantity ...");
  16. Application.CommandNode("/application/document/Axes/properties/auto_controls/gridsize").Command("value", "2");
  17. Application.CommandNode("/application/ui").Command("tutorialmessage", "Note that \"2\" was automatically interpreted as \"2 meters\", since meters are the standard unit of length in K-3D.");
  18. Application.CommandNode("/application/ui").Command("tutorialmessage", "For your reference, the standard units-of-measurement in K-3D are angular - degrees, area - square meters, length - meters, force - newtons, mass - kilograms, pressure - pascals, time - seconds, and volume - cubic meters.");
  19. Application.CommandNode("/application/ui").Command("tutorialmessage", "When you enter a value in a spin button, you can include the standard symbol for a wide variety (too many to list here) of physical units-of-measurement, and the value will automatically be converted to the standard.  For example, if you wanted the grid size to be 1 yard:");
  20. Application.CommandNode("/application/document/Axes/properties/auto_controls/gridsize").Command("value", "1yd");
  21. Application.CommandNode("/application/ui").Command("tutorialmessage", "... or if you wanted to measure it in fathoms ...");
  22. Application.CommandNode("/application/document/Axes/properties/auto_controls/gridsize").Command("value", "1 fath");
  23. Application.CommandNode("/application/ui").Command("tutorialmessage", "In addition to doing automatic unit conversion, spin buttons can also perform simple calculations ...");
  24. Application.CommandNode("/application/document/Axes/properties/auto_controls/gridsize").Command("value", "4 / 3 + 1");
  25. Application.CommandNode("/application/ui").Command("tutorialmessage", "In addition to the standard four mathematical operators, you can group with parenthesis, use standard trig and related functions, and use the symbol \"pi\" ...");
  26. Application.CommandNode("/application/document/Axes/properties/auto_controls/gridsize").Command("value", "(1+2) * sin(pi/4)");
  27. Application.CommandNode("/application/ui").Command("tutorialmessage", "That's it for data entry!  Time to move on to some real 3D work ...");
  28. Application.CommandNode("/application/tutorial_message").Command("close", "");
  29. Application.CommandNode("/application/document/window/file_close").Command("activate", "");
  30. Application.CommandNode("/application/window/help_tutorials").Command("activate", "");
  31.  
  32.  
  33.